Refactor Muon optimizer constructors - #6147
Draft
janEbert wants to merge 5 commits into
Draft
Conversation
Signed-off-by: Deyu Fu <deyuf@nvidia.com>
Signed-off-by: Deyu Fu <deyuf@nvidia.com>
svcnvidia-nemo-ci
marked this pull request as draft
July 30, 2026 11:14
Contributor
|
This PR has been automatically converted to draft because all PRs must start as drafts. When you are ready for review, click Ready for Review to begin the review process. This will:
See the contribution guide for more details. |
|
Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually. Contributors can view more details about this message here. |
6 tasks
janEbert
force-pushed
the
muon-init-refactor
branch
from
July 30, 2026 11:48
c673f0b to
a352ff5
Compare
Signed-off-by: janEbert <janpabloe@nvidia.com>
Now uses a utility function that can be shared with other optimizers that need similar functionality. Signed-off-by: janEbert <janpabloe@nvidia.com>
Now uses shared `TensorParallelMuon` initialization code using the `_tp_muon_pre_init` function. Instead of using `TensorParallelMuon.__init__`, we now use `AdaptiveMuon.__init__` so that we don't need to regularly copy-paste new functionality from the `AdaptiveMuon` initialization function. Signed-off-by: janEbert <janpabloe@nvidia.com>
janEbert
force-pushed
the
muon-init-refactor
branch
from
July 30, 2026 12:01
a352ff5 to
93c94ab
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Refactor
TensorParallelMuon.__init__method, so that the shared functionality can be reused byTensorParallelAdaptiveMuon.__init__. We can then initializeTensorParallelAdaptiveMuonusingAdaptiveMuon.__init__instead ofTensorParallelMuon.__init__, which means we don't need to copy-paste new features from Emerging-Optimizers into the constructor every so often.I also improve the typing by using the type aliases that
emerging_optimizersprovides.Based on #5321.